home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
UTILITY1
/
MONTOR.ZIP
/
MONSRC.ZIP
/
MONTOR.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-09-16
|
2KB
|
61 lines
Option Explicit
Global Const NumGauges = 8 ' maximum number of gauges
Global ActualGauges% ' depends on number of fixed drives
Global WnTx$ ' set by Timer, displayed in Form3
Global WarnHelp% ' set by Timer, used by Form3
' Declare Windows API function to get drive type
Declare Function GetDriveType% Lib "Kernel" (ByVal nDrive%)
Global Const DRIVE_INVALID = 0
Global Const DRIVE_REMOVABLE = 2
Global Const DRIVE_FIXED = 3
Global Const DRIVE_REMOTE = 4
' Define data type required by MemManInfo function
Type tagMemManInfo
Size As Long
LargestFreeBlock As Long
MaxPagesAvailable As Long
MaxPagesLockable As Long
TotalLinearSpace As Long
TotalUnlockedPages As Long
FreePages As Long
TotalPages As Long
FreeLinearSpace As Long
SwapFilePages As Long
PageSize As Integer
End Type
Global Const MMIsize = 42
' Declare Windows API functions for use by memory monitor
Declare Function MemManInfo% Lib "TOOLHELP.DLL" (mmi As tagMemManInfo)
Declare Function GetFreeSpace& Lib "KERNEL" (ByVal wFlags%)
' Define data type required by SystemHeapInfo function
Type TagSysHeapInfo
Size As Long
UserFreePercent As Integer
GDIFreePercent As Integer
UserSegment As Integer
GDISegment As Integer
End Type
Global Const SHIsize = 12
' Declare Windows API function for use by system resource monitor
Declare Function SystemHeapInfo% Lib "TOOLHELP.DLL" (shii As TagSysHeapInfo)
' Declare Windows API functions for INI file management
Declare Function GetPrivateProfileInt% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal nDefault%, ByVal lpFileName$)
Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName$, ByVal lpString$, ByVal lpFileName$)
' Declare Windows API functions for using WinHelp
Declare Function WinHelpByNum% Lib "User" Alias "WinHelp" (ByVal hWnd%, ByVal lpHelpFile$, ByVal wCommand%, ByVal dwData&)
Declare Function WinHelp% Lib "User" (ByVal hWnd%, ByVal lpHelpFile$, ByVal wCommand%, ByVal dwData$)
' Declare Windows API function for sound events
Declare Sub MessageBeep Lib "User" (ByVal wType%)
' Declare disk space functions found in external DLL
Declare Function GetDiskSize& Lib "DISKDLL.DLL" (ByVal Drive%)
Declare Function GetDiskFree& Lib "DISKDLL.DLL" (ByVal Drive%)